package com.yanqu.road.logic.bussiness.activity;

import com.yanqu.road.entity.activity.suitang.data.*;
import com.yanqu.road.entity.activity.suitang.enums.eSuiTangWarType;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class SuiTangActivityBusiness {
    // 配置
    public static <T> Map<Integer, T> getGenericConfigMap(int activityId, Class<T> type) {
        return DaoHelper.getGenericConfigDaoImpl().getGenericConfigMap(activityId, type);
    }

    // 数据
    public static SuiTangUserData getSuiTangUserData(int activityId, long userId) {
        return DaoHelper.getSuiTangUserDataDaoImpl().getSuiTangUserData(activityId, userId);
    }

    public static boolean addSuiTangUserData(SuiTangUserData data) {
        return DaoHelper.getSuiTangUserDataDaoImpl().add(data);
    }

    public static boolean updateSuiTangUserData(SuiTangUserData data) {
        return DaoHelper.getSuiTangUserDataDaoImpl().update(data);
    }

    public static CrossSuiTangData getCrossSuiTangData(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangDataDaoImpl().getCrossSuiTangData(activityId, groupId);
    }

    public static boolean addCrossSuiTangData(CrossSuiTangData data) {
        return DaoHelper.getCrossSuiTangDataDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangData(CrossSuiTangData data) {
        return DaoHelper.getCrossSuiTangDataDaoImpl().update(data);
    }

    public static Map<Integer, Map<eSuiTangWarType, Map<Integer, Map<Integer, CrossSuiTangCity>>>> getCrossSuiTangCity(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangCityDaoImpl().getCrossSuiTangCity(activityId, groupId);
    }

    public static boolean addCrossSuiTangCity(CrossSuiTangCity data) {
        return DaoHelper.getCrossSuiTangCityDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangCity(CrossSuiTangCity data) {
        return DaoHelper.getCrossSuiTangCityDaoImpl().update(data);
    }

    public static Map<Integer, Map<eSuiTangWarType, Map<Integer, Map<Integer, CrossSuiTangCityEvent>>>> getCrossSuiTangCityEvent(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangCityEventDaoImpl().getCrossSuiTangCityEvent(activityId, groupId);
    }

    public static boolean addCrossSuiTangCityEvent(CrossSuiTangCityEvent data) {
        return DaoHelper.getCrossSuiTangCityEventDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangCityEvent(CrossSuiTangCityEvent data) {
        return DaoHelper.getCrossSuiTangCityEventDaoImpl().update(data);
    }

    public static Map<String, CrossSuiTangUnionData> getCrossSuiTangUnionDataMap(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangUnionDataDaoImpl().getCrossSuiTangUnionData(activityId, groupId);
    }

    public static boolean addCrossSuiTangUnionData(CrossSuiTangUnionData data) {
        return DaoHelper.getCrossSuiTangUnionDataDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangUnionData(CrossSuiTangUnionData data) {
        return DaoHelper.getCrossSuiTangUnionDataDaoImpl().update(data);
    }

    public static Map<String, CrossSuiTangUnionJoinData> getCrossSuiTangUnionJoinDataMap(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangUnionJoinDataDaoImpl().getCrossSuiTangUnionJoinData(activityId, groupId);
    }

    public static boolean addCrossSuiTangUnionJoinData(CrossSuiTangUnionJoinData data) {
        return DaoHelper.getCrossSuiTangUnionJoinDataDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangUnionJoinData(CrossSuiTangUnionJoinData data) {
        return DaoHelper.getCrossSuiTangUnionJoinDataDaoImpl().update(data);
    }

    public static Map<String, Map<Long, CrossSuiTangUnionBuGaoData>> getCrossSuiTangUnionBuGaoDataMap(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangUnionBuGaoDataDaoImpl().getCrossSuiTangUnionBuGaoData(activityId, groupId);
    }

    public static boolean addCrossSuiTangUnionBuGaoData(CrossSuiTangUnionBuGaoData data) {
        return DaoHelper.getCrossSuiTangUnionBuGaoDataDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangUnionBuGaoData(CrossSuiTangUnionBuGaoData data) {
        return DaoHelper.getCrossSuiTangUnionBuGaoDataDaoImpl().update(data);
    }

    public static Map<Long, CrossSuiTangUserData> getCrossUserData(int activityId, int groupId) {
        return DaoHelper.getCrossSuiTangUserDataDaoImpl().getCrossSuiTangUserData(activityId, groupId);
    }

    public static boolean addCrossSuiTangUserData(CrossSuiTangUserData data) {
        return DaoHelper.getCrossSuiTangUserDataDaoImpl().add(data);
    }

    public static boolean updateCrossSuiTangUserData(CrossSuiTangUserData data) {
        return DaoHelper.getCrossSuiTangUserDataDaoImpl().update(data);
    }

    public static boolean addCityReportList(List<CrossSuiTangCityWarReportData> reportList){
        return DaoHelper.getCrossSuiTangReportDaoImpl().addCityReportList(reportList);
    }

    public static boolean addUserReportList(List<CrossSuiTangUserWarReportData> reportList){
        return DaoHelper.getCrossSuiTangReportDaoImpl().addUserReportList(reportList);
    }

    public static Map<String, List<CrossSuiTangCityWarReportData>> getCityReportList(int activityId, int groupId, int limitNum) {
        return DaoHelper.getCrossSuiTangReportDaoImpl().getCityReportList(activityId, groupId, limitNum);
    }

    public static Map<Long, List<CrossSuiTangUserWarReportData>> getUserReportList(int activityId, int groupId, int num) {
        return DaoHelper.getCrossSuiTangReportDaoImpl().getUserReportList(activityId, groupId, num);
    }
}
